package com.yjhb.android.sbz.enums;

/**
 * 创建者 zx
 * 创建时间 2021/1/29 11:21
 */
public enum GameCompany {
    COMPANY_UNKNOWN(-99, "未知"),
    COMPANY_DY(1, "多游"),
    COMPANY_XQ(2, "嘻趣"),
    COMPANY_XW(3, "闲玩"),
    COMPANY_JXW(4, "聚享玩"),
    ;


    private int flag;
    private String name;


    GameCompany(int flag, String name) {
        this.flag = flag;
        this.name = name;
    }

    public int getFlag() {
        return flag;
    }

    public void setFlag(int flag) {
        this.flag = flag;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static GameCompany getGameCompany(int flag) {
        switch (flag) {
            case 1:
                return COMPANY_DY;
            case 2:
                return COMPANY_XQ;
            case 3:
                return COMPANY_XW;
            case 4:
                return COMPANY_JXW;
            default:
                return COMPANY_UNKNOWN;
        }
    }
}
